<?php
	require("includes/basic.php");
	if(!isset($_SESSION['uid']) && $userType!='A')
	{
		header("location:authorise.php");
	}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>
	<HEAD>
		
		<TITLE> :: <?php echo $appName?> :: </TITLE>
		<link rel='stylesheet' type='text/css' href='style/inner.css'>
		<link rel='stylesheet' type='text/css' href='style/admin.css'>
		<script type='text/javascript' src='js/inner.js'></script>
	</HEAD>

	<body unselectable="on" class="dialog"> 
		<?php $pageName="Administration View"; ?>
		<?php require("includes/header.php"); ?>

				        
<?php	

$tid=$_REQUEST['temp_id'];

$tempdetails=mysql_query("SELECT * FROM templates WHERE content_id=$tid");

while($row=mysql_fetch_array($tempdetails))
{

	$temid=$row['content_id'];
	$title=$row['title'];
	$content=$row['content'];
	$created_on=$row['created_on'];
	$status=$row['record_status'];

?>
<table width='100%' cellspacing='0' cellpadding='0' border='0'><tr><td id='screenH'>
		<div class='pathbar'><a href='index.php'>Admin</a> -> <a href="view-templates.php">Templates</a> -> Template details</div>
		<div class='screenTitle'>
			<table width='100%' cellspacing='0'>
				<tr>
					<td>
						<?php echo "Template Details";?>
					</td>		
				</tr>
			</table>
		</div>
</table>

	<center>
	<table>
<tr><td style="height:10px;">&nbsp;</td></tr>
</table>
	
	<table border="0" width="90%" style="border:1px solid #E0DFE3;" cellspacing="0">
	
<tr><td colspan="5" align="left" style="border-bottom:1px solid #E0DFE3;padding:5px;font-weight:bold;font-size:13px;background-color:#E0DFE3;"><b>TEMPLATE DETAILS</b></td></tr>


<tr>
	<td class="open">Title</td>
    <td class="open_data"><?php echo $title; ?></td>
</tr>
<tr>
	<td class="open">Template Content</td>
    <td class="open_data"><?php echo $content; ?></td>
</tr>

<tr>
	<td class="open">Template Created On</td>
    <td class="open_data"><?php echo $created_on; ?></td>
</tr>

<tr>
	<td class="open">Status</td>
    <td class="open_data">
			<?php 
			if($status=='Y')
			{
			echo "Yes";
			}
			else
			{
				echo "No";
			}?>
	</td>
</tr>


<?php 

}
?>
	</table>


	</center>
	
		<?php require("includes/footer.php"); ?>
	</BODY>
</HTML>
